<template>
 
    <div>
 <el-table
    :data="tableData"
    stripe
    style="width: 100%">
    <el-table-column
      prop="id"
      label="序号"
      width="180">
    </el-table-column>
    <el-table-column
      prop="name"
      label="流程类型"
      width="180">
      审签流程
    </el-table-column>
    <el-table-column
      prop="createTime"
      label="发起时间">
    </el-table-column>
    <el-table-column
      label="提交人"
      prop="username"
    >
    </el-table-column>
      <el-table-column
      prop="createBy"
      label="步骤">
      下一步，提交给庭长签字
    </el-table-column>
  </el-table>
  <div style="padding: 10px 0">
      <el-pagination
        background
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
        :current-page="pageNum"
        :page-sizes="[10, 20, 30, 40]"
        :page-size="pageSize"
        layout="total, sizes, prev, pager, next, jumper"
        :total="total"
      >
      </el-pagination>
    </div>
    </div>
</template>

<script>
  export default {
     data() {
      return {
        tableData: [],
        courtId:parseInt(localStorage.getItem("courtId")),
        username:JSON.parse(localStorage.getItem('user')).username,
        pageNum: 1,
        pageSize: 10,
      }
    },
    methods:{
      load(){
        this.request.get("/process/getDealting", {
          params:{
            courtId:this.courtId,
            username:this.username,
            pageNum:this.pageNum,
            pageSize:this.pageSize
          }
        }
       ).then(res =>{
        this.tableData = res.data.records
       })
      },
       handleSizeChange(pageSize) {
      console.log(pageSize);
      this.pageSize = pageSize;
      this.load();
    },
    handleCurrentChange(pageNum) {
      console.log(pageNum);
      this.pageNum = pageNum;
      this.load();
    },
    },
    mounted(){
        this.load()
    }
  }
</script>